<template>
  <div>
    <el-form :inline="true" class="demo-form-inline">
      <el-form-item label="经度">
        <el-input v-model="jing" placeholder="经度"></el-input>
      </el-form-item>
      <el-form-item label="维度">
        <el-input v-model="wei" placeholder="维度"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="sendDataToServer">给后台发送消息</el-button>
      </el-form-item>
    </el-form>

  </div>
</template>

<script>
import CropView from "@/views/CropView";
export default {
  name: "WebSocketView",
  views:{
    CropView
  },
  data() {

    return {
      jing:'',
      wei:'',

    }
  }, methods: {
    sendDataToServer() {
        this.axios.get("/websocket/websocketAddress",{params:{x:this.jing,y:this.wei}}).then(()=>{
          this.$message.success("发送成功")
        })
    },
  }, created() {
  }
}
</script>

<style scoped>

</style>
